package com.ds.lens.data.vo.in.v2.monitor;

import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Range;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author WeiShaoying
 * @date 2019/11/6 下午2:38
 */
@Setter
@Getter
public class LensMonitorInVO {

    /**
     * 名称
     */
    @NotEmpty(message = "名称不能为空")
    private String name;

    /**
     * 集成id
     */
    @NotNull(message = "监控类型不能为空")
    private Long integrationId;

    /**
     * 检测方法（1：静态，2：动态）
     */
    @NotNull(message = "检测方法不能为空")
    @Range(min = 1, max = 2, message = "检测方法异常")
    private Integer detectionMethod;

    /**
     * 应用id
     */
    @NotNull(message = "应用不能为空")
    private Long applicationId;


    @NotNull(message = "监控定义不能为空")
    @Valid
    private LensMonitorDefineInVO define;

    @NotNull(message = "监控通知不能为空")
    @Valid
    private LensMonitorNotifyInVO notify;

    private List<String> tags;

}
